package com.design.strategy.demo;

/**
 * Created by yijy on 2018/1/15.
 */
public class Cat {

    private String name;

    private int weight;

    private int height;

    private int age;

    private ComparableCatHeight comparableCatHeight = new ComparableCatHeight();

    public Cat(String name, int weight, int height, int age) {
        this.name = name;
        this.weight = weight;
        this.height = height;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void compare(Cat[] cat){
        comparableCatHeight.compare(cat);
    }

    @Override
    public String toString() {
        return "Cat{" +
                "name='" + name + '\'' +
                ", weight=" + weight +
                ", height=" + height +
                ", age=" + age +
                '}';
    }
}
